home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_commie_grid.cog < prev    next >
Text File  |  1999-11-15  |  6KB  |  220 lines

  1.  
  2. # Jones 3D Cog Script
  3. #
  4. # TEO_Commie_Grid.cog
  5. # Basic waypoints and AI behavior for the commies in TEO
  6. #
  7. # [JM]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15. message         startup
  16. message         user0
  17.  
  18. # ====================== SUBROUTINES ===============================
  19. flex            MakeGrid    local
  20. flex            EnableAI    local
  21.  
  22. # ========================= MISC LOCAL VARIABLES ===================
  23. int         counter         local
  24.  
  25. # ========================== CONSTANTS =============================
  26. int         NUMBER_OF_WAYPOINTS=51          local
  27. int         NUMBER_OF_ROAMERS=6             local
  28. int         NUMBER_OF_SLACKERS=4            local
  29. # ========================== COMMIES ===============================
  30. thing         Roamer00
  31. thing         Roamer01
  32. thing         Roamer02
  33. thing         Roamer03
  34. thing         Roamer04
  35. thing         Roamer05    #Last roamer is a part of the Volodnikov Cutscene... no need to clear flags on him
  36.  
  37. thing         Slacker00
  38. thing         Slacker01
  39. thing         Slacker02
  40. thing         Slacker03
  41.  
  42. # =========================== WAYPOINTS ============================
  43. thing       wpnt00
  44. thing       wpnt01
  45. thing       wpnt02
  46. thing       wpnt03
  47. thing       wpnt04
  48. thing       wpnt05
  49. thing       wpnt06
  50. thing       wpnt07
  51. thing       wpnt08
  52. thing       wpnt09
  53. thing       wpnt10
  54. thing       wpnt11
  55. thing       wpnt12
  56. thing       wpnt13
  57. thing       wpnt14
  58. thing       wpnt15
  59. thing       wpnt16
  60. thing       wpnt17
  61. thing       wpnt18
  62. thing       wpnt19
  63. thing       wpnt20
  64. thing       wpnt21
  65. thing       wpnt22
  66. thing       wpnt23
  67. thing       wpnt24
  68. thing       wpnt25
  69. thing       wpnt26
  70. thing       wpnt27
  71. thing       wpnt28
  72. thing       wpnt29
  73. thing       wpnt30
  74. thing       wpnt31
  75. thing       wpnt32
  76. thing       wpnt33
  77. thing       wpnt34
  78. thing       wpnt35
  79. thing       wpnt36
  80. thing       wpnt37
  81. thing       wpnt38
  82. thing       wpnt39
  83. thing       wpnt40
  84. thing       wpnt41
  85. thing       wpnt42
  86. thing       wpnt43
  87. thing       wpnt44
  88. thing       wpnt45
  89. thing       wpnt46
  90. thing       wpnt47
  91. thing       wpnt48
  92. thing       wpnt49
  93. thing       wpnt50
  94.  
  95. # ========================================================================
  96. end
  97.  
  98. # ========================================================================
  99. # =============================== CODE ===================================
  100. # ========================================================================
  101. code
  102. # ========================================================================
  103. startup:
  104.     
  105.     for(counter = 0; counter < (NUMBER_OF_ROAMERS - 1); counter = counter + 1)
  106.     {
  107.         SetThingFlags(Roamer00[counter], 0x80000);
  108.     }
  109.  
  110.     return;
  111.     
  112. # ========================================================================
  113. user0:
  114.     
  115.     Call MakeGrid;
  116.     Call EnableAI;
  117.                                                                           
  118.     return;
  119.     
  120. # ========================================================================
  121. MakeGrid:
  122.     
  123.     for(counter = 0; counter < NUMBER_OF_WAYPOINTS; counter = counter + 1)
  124.     {
  125.         AISetWpnt(wpnt00[counter], counter);
  126.     }
  127.     
  128.     //Chamber1
  129.     AIConnectWpnts(0, 1);
  130.     AIConnectWpnts(1, 2);
  131.     AIConnectWpnts(2, 3);
  132.     AIConnectWpnts(2, 4);
  133.     AIConnectWpnts(2, 5);
  134.     AIConnectWpnts(3, 6);
  135.     AIConnectWpnts(4, 10);
  136.     AIConnectWpnts(5, 8);
  137.     AIConnectWpnts(5, 9);
  138.     AIConnectWpnts(6, 7);
  139.     AIConnectWpnts(6, 8);
  140.     AIConnectWpnts(6, 12);
  141.     AIConnectWpnts(8, 11);
  142.     AIConnectWpnts(9, 10);
  143.     AIConnectWpnts(9, 11);
  144.     AIConnectWpnts(10, 14);
  145.     AIConnectWpnts(11, 13);
  146.     AIConnectWpnts(12, 13);
  147.     AIConnectWpnts(13, 14);
  148.     
  149.     //Stairs
  150.     AIConnectWpnts(15, 16);
  151.     AIConnectWpnts(16, 17);
  152.     AIConnectWpnts(17, 18);
  153.     AIConnectWpnts(18, 19);
  154.     AIConnectWpnts(19, 20);
  155.     AIConnectWpnts(20, 21);
  156.     AIConnectWpnts(21, 22);
  157.     AIConnectWpnts(22, 23);
  158.     
  159.     //StatLock
  160.     AIConnectWpnts(24, 25);
  161.     AIConnectWpnts(24, 28);
  162.     AIConnectWpnts(25, 26);
  163.     AIConnectWpnts(26, 27);
  164.     AIConnectWpnts(27, 28);
  165.     
  166.     //MirrorLock Ledge1
  167.     AIConnectWpnts(29, 30);
  168.     
  169.     //MirrorLock Ledge2
  170.     AIConnectWpnts(31, 32);
  171.     
  172.     //MirrorLock
  173.     AIConnectWpnts(33, 34);
  174.     AIConnectWpnts(33, 46);
  175.     AIConnectWpnts(34, 35);
  176.     AIConnectWpnts(35, 36);
  177.     AIConnectWpnts(35, 50);
  178.     AIConnectWpnts(36, 37);
  179.     AIConnectWpnts(37, 38);
  180.     AIConnectWpnts(38, 39);
  181.     AIConnectWpnts(39, 40);
  182.     AIConnectWpnts(39, 49);
  183.     AIConnectWpnts(40, 41);
  184.     AIConnectWpnts(41, 42);
  185.     AIConnectWpnts(42, 43);
  186.     AIConnectWpnts(42, 48);
  187.     AIConnectWpnts(43, 44);
  188.     AIConnectWpnts(44, 45);
  189.     AIConnectWpnts(45, 46);
  190.     AIConnectWpnts(45, 47);
  191.     AIConnectWpnts(47, 48);
  192.     AIConnectWpnts(47, 50);
  193.     AIConnectWpnts(48, 49);
  194.     AIConnectWpnts(49, 50);
  195.  
  196.     return;
  197. # =======================================================================
  198. EnableAI:
  199.     
  200.     for(counter = 0; counter < NUMBER_OF_ROAMERS; counter = counter + 1)
  201.     {
  202.         ClearThingFlags(Roamer00[counter], 0x80000);
  203.         AISetInstinctWpntMode(Roamer00[counter]);
  204.         AIEnableInstinct(Roamer00[counter], "roam", 1);
  205.     }
  206.     
  207.     for(counter = 0; counter < NUMBER_OF_SLACKERS; counter = counter + 1)
  208.     {
  209.         AISetInstinctWpntMode(Slacker00[counter]);  
  210.     }
  211.     
  212.     return;
  213. # =======================================================================
  214.         
  215. end
  216.  
  217.  
  218.